home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Dev / Src / Gl_bmp_load.lha / GL_BMP_Load / bmp.h < prev    next >
C/C++ Source or Header  |  2002-12-26  |  2KB  |  46 lines

  1. /*  Structs for (Windows-)BMP Files
  2.  *  Author: Norman Walter
  3.  *  Date: 22.12.2002
  4.  */
  5.  
  6. #ifndef BMP_H
  7. #define BMP_H
  8. #endif
  9.  
  10. #ifndef EXEC_TYPES_H
  11. #include <exec/types.h>
  12. #endif
  13.  
  14. // the universal bitmap ID
  15. #define BITMAP_ID 0x4D42
  16.  
  17. typedef struct tagBITMAPFILEHEADER
  18. {
  19.     WORD          bfType;            // specifies the file type; must be BM (0x4D42)
  20.     ULONG         bfSize;            // specifies the size in bytes of the bitmap file
  21.     WORD          bfReserved1;       // reserved; must be zero
  22.     WORD          bfReserved2;       // reserved; must be zero
  23.     ULONG         bfOffBits;         // specifies the offset, in bytes, form the
  24.                             // BITMAPFILEHEADER structure to the bitmap bits
  25. } BITMAPFILEHEADER;
  26.  
  27. typedef struct tagBITMAPINFOHEADER
  28. {
  29.     ULONG         biSize;            // specifies number of bytes required by structure
  30.     LONG          biWidth;           // specifies the width of the bitmap, in pixels
  31.     LONG          biHeight;          // specifies the height of the bitmap, in pixels
  32.     WORD          biPlanes;          // specifies the number of color planes, must be 1
  33.     WORD          biBitCount;        // specifies the number of bits per pixel; must be 1,4,
  34.                             // 8, 16, 24 or 32
  35.     ULONG         biCompression;     // specifies the type of compression
  36.     ULONG         biSizeImage;       // size of Image in bytes
  37.     LONG          biXPelsPerMeter;   // specifies the number of pixels per meter in x axis
  38.     LONG          biYPelsPerMeter;   // specifies the number of pixels per meter in y axis
  39.     ULONG         biClrUsed;         // specifies the numper of colors used by the bitmap
  40.     ULONG         biClrImportant;    // specifies the number of colors that are important
  41. } BITMAPINFOHEADER;
  42.  
  43. BITMAPINFOHEADER bitmapInfoHeader;    // Bitmap info header
  44. unsigned char*   bitmapData;          // the bitmap data
  45.  
  46.